package com.lyy.king.tools.interfaces.impl;

import com.lyy.king.common.core.domain.Result;
import com.lyy.king.tools.interfaces.FileCommonInterface;
import com.lyy.king.tools.service.file.FileCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件处理
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: cdx
 * @Created: 2024/1/10 20:04
 */
@Service
public class FileCommonInterfaceImpl implements FileCommonInterface {
    @Autowired
    FileCommonService fileCommonService;

    @Override
    public Result<String> savaFile(MultipartFile file) {
        return Result.succcess(fileCommonService.savaFile(file));
    }

    @Override
    public Result<String> getFileDownUrlByFileName(String fileName) {
        return Result.succcess(fileCommonService.getFileDownUrlByFileName(fileName));
    }
}
